
package com.zzvcom.sms.entity;

import java.util.Map;
import java.util.Objects;

public class AppParkingSyncParam extends AppParam {
    private final Long syncStartTime;
    private final Integer pageNumber;

    public Long getSyncStartTime() {
        return syncStartTime;
    }

    public Integer getPageNumber() {
        return pageNumber;
    }

    public AppParkingSyncParam(String appKey, String companyCode, Long syncStartTime, Integer pageNumber, Long timestamp, String nonce) {
        super(appKey, companyCode, timestamp, nonce);
        this.syncStartTime = syncStartTime;
        this.pageNumber = pageNumber;
    }

    @Override
    public Map<String, String> toMap() {
        Map<String, String> treeMap = super.toMap();
        treeMap.put("pageNumber", this.getPageNumber().toString());
        if (Objects.nonNull(this.getSyncStartTime())) {
            treeMap.put("syncStartTime", this.getSyncStartTime().toString());
        }
        return treeMap;
    }
}
